<!DOCTYPE html>
<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <title>添加用户</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="css/font.css">
    <link rel="stylesheet" href="css/xadmin.css">
    <script type="text/javascript" src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script type="text/javascript" src="lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="js/xadmin.js"></script>
    <script type="text/javascript" src="js/cookie.js"></script>
</head>
<body>
<script>
    $(function () {
        var url = location.search;
        console.log(url);
        var id=url.split("=")[1];
        var str="http://localhost:8080/user/getUserList/ID/eq/"+11;
        $.ajax({
            url:str,
            type:"GET",
            dataType:'JSON',
            contentType : "application/json; charset=utf-8",
            success:function(data){
                document.getElementById("L_uid").value=data[0].uId;
                document.getElementById("L_name").value=data[0].name;
                //document.getElementById("L_password").value=data[0].password;
                document.getElementById("L_telCode").value=data[0].telCode;
                document.getElementById("L_dptid").value=data[0].dptId;
            },
            error:function () {
                alert("error");
            }
        });
        $("#ensure").click(function (){
            x_admin_close();
        });
    });
</script>
<div class="x-body">
    <form class="layui-form">
        <div class="layui-form-item">
            <label for="L_uid" class="layui-form-label">
                <span class="x-red">*</span>用户编号
            </label>
            <div class="layui-input-inline">
                <input type="text" id="L_uid" name="uid" required="" lay-verify="uid"
                       autocomplete="off" class="layui-input" readonly="readonly">
            </div>
        </div>
        <div class="layui-form-item">
            <label for="L_name" class="layui-form-label">
                <span class="x-red">*</span>姓名
            </label>
            <div class="layui-input-inline">
                <input type="text" id="L_name" name="pass" required="" lay-verify="name"
                       autocomplete="off" class="layui-input" readonly="readonly">
            </div>
        </div>
        <!--<div class="layui-form-item">-->
            <!--<label for="L_password" class="layui-form-label">-->
                <!--<span class="x-red">*</span>密码-->
            <!--</label>-->
            <!--<div class="layui-input-inline">-->
                <!--<input type="text" id="L_password" name="password" required="" lay-verify="password"-->
                       <!--autocomplete="off" class="layui-input">-->
            <!--</div>-->
        <!--</div>-->
        <div class="layui-form-item">
            <label for="L_telCode" class="layui-form-label">
                <span class="x-red">*</span>电话号码
            </label>
            <div class="layui-input-inline">
                <input type="text" id="L_telCode" name="telCode" required="" lay-verify="telCode"
                       autocomplete="off" class="layui-input" readonly="readonly">
            </div>
        </div>
        <div class="layui-form-item">
            <label for="L_dptid" class="layui-form-label">
                <span class="x-red">*</span>部门编号
            </label>
            <div class="layui-input-inline">
                <input type="text" id="L_dptid" name="dptId" required="" lay-verify="dptId"
                       autocomplete="off" class="layui-input" readonly="readonly">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label"></label>
            <button id="ensure" class="layui-btn" lay-filter="ensure" lay-submit="" style="margin-left: 40px;width: 80px">
                确定
            </button>
        </div>
    </form>
</div>
</body>

</html>